3.1.58 \(\int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2 \, dx\) [58]

3.1.58.1 Optimal result
3.1.58.2 Mathematica [A] (verified)
3.1.58.3 Rubi [A] (verified)
3.1.58.4 Maple [A] (verified)
3.1.58.5 Fricas [A] (verification not implemented)
3.1.58.6 Sympy [F]
3.1.58.7 Maxima [F]
3.1.58.8 Giac [F]
3.1.58.9 Mupad [F(-1)]

3.1.58.1 Optimal result

Integrand size = 28, antiderivative size = 177 \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2 \, dx=\frac {2 a^{5/2} c^2 \arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)}}\right )}{f}-\frac {2 a^3 c^2 \tan (e+f x)}{f \sqrt {a+a \sec (e+f x)}}+\frac {2 a^4 c^2 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}+\frac {6 a^5 c^2 \tan ^5(e+f x)}{5 f (a+a \sec (e+f x))^{5/2}}+\frac {2 a^6 c^2 \tan ^7(e+f x)}{7 f (a+a \sec (e+f x))^{7/2}} \]

output
2*a^(5/2)*c^2*arctan(a^(1/2)*tan(f*x+e)/(a+a*sec(f*x+e))^(1/2))/f-2*a^3*c^ 
2*tan(f*x+e)/f/(a+a*sec(f*x+e))^(1/2)+2/3*a^4*c^2*tan(f*x+e)^3/f/(a+a*sec( 
f*x+e))^(3/2)+6/5*a^5*c^2*tan(f*x+e)^5/f/(a+a*sec(f*x+e))^(5/2)+2/7*a^6*c^ 
2*tan(f*x+e)^7/f/(a+a*sec(f*x+e))^(7/2)
 
3.1.58.2 Mathematica [A] (verified)

Time = 1.10 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.70 \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2 \, dx=\frac {2 a^3 c^2 \left (105 \sqrt {c} \text {arctanh}\left (\frac {\sqrt {c-c \sec (e+f x)}}{\sqrt {c}}\right )+\sqrt {c-c \sec (e+f x)} \left (-92-46 \sec (e+f x)+18 \sec ^2(e+f x)+15 \sec ^3(e+f x)\right )\right ) \tan (e+f x)}{105 f \sqrt {a (1+\sec (e+f x))} \sqrt {c-c \sec (e+f x)}} \]

input
Integrate[(a + a*Sec[e + f*x])^(5/2)*(c - c*Sec[e + f*x])^2,x]
 
output
(2*a^3*c^2*(105*Sqrt[c]*ArcTanh[Sqrt[c - c*Sec[e + f*x]]/Sqrt[c]] + Sqrt[c 
 - c*Sec[e + f*x]]*(-92 - 46*Sec[e + f*x] + 18*Sec[e + f*x]^2 + 15*Sec[e + 
 f*x]^3))*Tan[e + f*x])/(105*f*Sqrt[a*(1 + Sec[e + f*x])]*Sqrt[c - c*Sec[e 
 + f*x]])
 
3.1.58.3 Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.86, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3042, 4392, 3042, 4375, 364, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (a \sec (e+f x)+a)^{5/2} (c-c \sec (e+f x))^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^{5/2} \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2dx\)

\(\Big \downarrow \) 4392

\(\displaystyle a^2 c^2 \int \sqrt {\sec (e+f x) a+a} \tan ^4(e+f x)dx\)

\(\Big \downarrow \) 3042

\(\displaystyle a^2 c^2 \int \cot \left (e+f x+\frac {\pi }{2}\right )^4 \sqrt {\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}dx\)

\(\Big \downarrow \) 4375

\(\displaystyle -\frac {2 a^5 c^2 \int \frac {\tan ^4(e+f x) \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+2\right )^2}{(\sec (e+f x) a+a)^2 \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right )}d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{f}\)

\(\Big \downarrow \) 364

\(\displaystyle -\frac {2 a^5 c^2 \int \left (\frac {a \tan ^6(e+f x)}{(\sec (e+f x) a+a)^3}+\frac {3 \tan ^4(e+f x)}{(\sec (e+f x) a+a)^2}+\frac {\tan ^2(e+f x)}{a (\sec (e+f x) a+a)}+\frac {1}{a^2 \left (\frac {a \tan ^2(e+f x)}{\sec (e+f x) a+a}+1\right )}-\frac {1}{a^2}\right )d\left (-\frac {\tan (e+f x)}{\sqrt {\sec (e+f x) a+a}}\right )}{f}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {2 a^5 c^2 \left (-\frac {\arctan \left (\frac {\sqrt {a} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a}}\right )}{a^{5/2}}+\frac {\tan (e+f x)}{a^2 \sqrt {a \sec (e+f x)+a}}-\frac {a \tan ^7(e+f x)}{7 (a \sec (e+f x)+a)^{7/2}}-\frac {3 \tan ^5(e+f x)}{5 (a \sec (e+f x)+a)^{5/2}}-\frac {\tan ^3(e+f x)}{3 a (a \sec (e+f x)+a)^{3/2}}\right )}{f}\)

input
Int[(a + a*Sec[e + f*x])^(5/2)*(c - c*Sec[e + f*x])^2,x]
 
output
(-2*a^5*c^2*(-(ArcTan[(Sqrt[a]*Tan[e + f*x])/Sqrt[a + a*Sec[e + f*x]]]/a^( 
5/2)) + Tan[e + f*x]/(a^2*Sqrt[a + a*Sec[e + f*x]]) - Tan[e + f*x]^3/(3*a* 
(a + a*Sec[e + f*x])^(3/2)) - (3*Tan[e + f*x]^5)/(5*(a + a*Sec[e + f*x])^( 
5/2)) - (a*Tan[e + f*x]^7)/(7*(a + a*Sec[e + f*x])^(7/2))))/f
 

3.1.58.3.1 Defintions of rubi rules used

rule 364
Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_))/((c_) + (d_.)*(x_)^2), 
x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*((a + b*x^2)^p/(c + d*x^2)), x], x 
] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && (In 
tegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4375
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_.), x_Symbol] :> Simp[-2*(a^(m/2 + n + 1/2)/d)   Subst[Int[x^m*((2 + a*x^2 
)^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x] 
]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && I 
ntegerQ[n - 1/2]
 

rule 4392
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( 
d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m   Int[Cot[e + f*x]^(2*m)*( 
c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && E 
qQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] &&  !( 
IntegerQ[n] && GtQ[m - n, 0])
 
3.1.58.4 Maple [A] (verified)

Time = 22.84 (sec) , antiderivative size = 207, normalized size of antiderivative = 1.17

method result size
default \(-\frac {2 a^{2} c^{2} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (-105 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \cos \left (f x +e \right )-105 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+92 \sin \left (f x +e \right )+46 \tan \left (f x +e \right )-18 \sec \left (f x +e \right ) \tan \left (f x +e \right )-15 \sec \left (f x +e \right )^{2} \tan \left (f x +e \right )\right )}{105 f \left (\cos \left (f x +e \right )+1\right )}\) \(207\)
parts \(\frac {2 c^{2} a^{2} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (3 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \cos \left (f x +e \right )+3 \,\operatorname {arctanh}\left (\frac {\sin \left (f x +e \right )}{\left (\cos \left (f x +e \right )+1\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}}\right ) \sqrt {-\frac {\cos \left (f x +e \right )}{\cos \left (f x +e \right )+1}}+8 \sin \left (f x +e \right )+\tan \left (f x +e \right )\right )}{3 f \left (\cos \left (f x +e \right )+1\right )}+\frac {2 c^{2} a^{2} \left (46 \cos \left (f x +e \right )^{3}+23 \cos \left (f x +e \right )^{2}+12 \cos \left (f x +e \right )+3\right ) \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \tan \left (f x +e \right ) \sec \left (f x +e \right )^{2}}{21 f \left (\cos \left (f x +e \right )+1\right )}-\frac {4 c^{2} a^{2} \sqrt {a \left (\sec \left (f x +e \right )+1\right )}\, \left (43 \sin \left (f x +e \right )+14 \tan \left (f x +e \right )+3 \sec \left (f x +e \right ) \tan \left (f x +e \right )\right )}{15 f \left (\cos \left (f x +e \right )+1\right )}\) \(317\)

input
int((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^2,x,method=_RETURNVERBOSE)
 
output
-2/105*a^2*c^2/f*(a*(sec(f*x+e)+1))^(1/2)/(cos(f*x+e)+1)*(-105*arctanh(sin 
(f*x+e)/(cos(f*x+e)+1)/(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2))*(-cos(f*x+e)/(c 
os(f*x+e)+1))^(1/2)*cos(f*x+e)-105*arctanh(sin(f*x+e)/(cos(f*x+e)+1)/(-cos 
(f*x+e)/(cos(f*x+e)+1))^(1/2))*(-cos(f*x+e)/(cos(f*x+e)+1))^(1/2)+92*sin(f 
*x+e)+46*tan(f*x+e)-18*sec(f*x+e)*tan(f*x+e)-15*sec(f*x+e)^2*tan(f*x+e))
 
3.1.58.5 Fricas [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 409, normalized size of antiderivative = 2.31 \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2 \, dx=\left [\frac {105 \, {\left (a^{2} c^{2} \cos \left (f x + e\right )^{4} + a^{2} c^{2} \cos \left (f x + e\right )^{3}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) - 2 \, {\left (92 \, a^{2} c^{2} \cos \left (f x + e\right )^{3} + 46 \, a^{2} c^{2} \cos \left (f x + e\right )^{2} - 18 \, a^{2} c^{2} \cos \left (f x + e\right ) - 15 \, a^{2} c^{2}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{105 \, {\left (f \cos \left (f x + e\right )^{4} + f \cos \left (f x + e\right )^{3}\right )}}, -\frac {2 \, {\left (105 \, {\left (a^{2} c^{2} \cos \left (f x + e\right )^{4} + a^{2} c^{2} \cos \left (f x + e\right )^{3}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt {a} \sin \left (f x + e\right )}\right ) + {\left (92 \, a^{2} c^{2} \cos \left (f x + e\right )^{3} + 46 \, a^{2} c^{2} \cos \left (f x + e\right )^{2} - 18 \, a^{2} c^{2} \cos \left (f x + e\right ) - 15 \, a^{2} c^{2}\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )\right )}}{105 \, {\left (f \cos \left (f x + e\right )^{4} + f \cos \left (f x + e\right )^{3}\right )}}\right ] \]

input
integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^2,x, algorithm="fricas")
 
output
[1/105*(105*(a^2*c^2*cos(f*x + e)^4 + a^2*c^2*cos(f*x + e)^3)*sqrt(-a)*log 
((2*a*cos(f*x + e)^2 - 2*sqrt(-a)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))* 
cos(f*x + e)*sin(f*x + e) + a*cos(f*x + e) - a)/(cos(f*x + e) + 1)) - 2*(9 
2*a^2*c^2*cos(f*x + e)^3 + 46*a^2*c^2*cos(f*x + e)^2 - 18*a^2*c^2*cos(f*x 
+ e) - 15*a^2*c^2)*sqrt((a*cos(f*x + e) + a)/cos(f*x + e))*sin(f*x + e))/( 
f*cos(f*x + e)^4 + f*cos(f*x + e)^3), -2/105*(105*(a^2*c^2*cos(f*x + e)^4 
+ a^2*c^2*cos(f*x + e)^3)*sqrt(a)*arctan(sqrt((a*cos(f*x + e) + a)/cos(f*x 
 + e))*cos(f*x + e)/(sqrt(a)*sin(f*x + e))) + (92*a^2*c^2*cos(f*x + e)^3 + 
 46*a^2*c^2*cos(f*x + e)^2 - 18*a^2*c^2*cos(f*x + e) - 15*a^2*c^2)*sqrt((a 
*cos(f*x + e) + a)/cos(f*x + e))*sin(f*x + e))/(f*cos(f*x + e)^4 + f*cos(f 
*x + e)^3)]
 
3.1.58.6 Sympy [F]

\[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2 \, dx=c^{2} \left (\int a^{2} \sqrt {a \sec {\left (e + f x \right )} + a}\, dx + \int \left (- 2 a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{2}{\left (e + f x \right )}\right )\, dx + \int a^{2} \sqrt {a \sec {\left (e + f x \right )} + a} \sec ^{4}{\left (e + f x \right )}\, dx\right ) \]

input
integrate((a+a*sec(f*x+e))**(5/2)*(c-c*sec(f*x+e))**2,x)
 
output
c**2*(Integral(a**2*sqrt(a*sec(e + f*x) + a), x) + Integral(-2*a**2*sqrt(a 
*sec(e + f*x) + a)*sec(e + f*x)**2, x) + Integral(a**2*sqrt(a*sec(e + f*x) 
 + a)*sec(e + f*x)**4, x))
 
3.1.58.7 Maxima [F]

\[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2 \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )}^{\frac {5}{2}} {\left (c \sec \left (f x + e\right ) - c\right )}^{2} \,d x } \]

input
integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^2,x, algorithm="maxima")
 
output
-1/210*(105*((a^2*c^2*cos(2*f*x + 2*e)^2 + a^2*c^2*sin(2*f*x + 2*e)^2 + 2* 
a^2*c^2*cos(2*f*x + 2*e) + a^2*c^2)*arctan2((cos(2*f*x + 2*e)^2 + sin(2*f* 
x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1)^(1/4)*sin(1/2*arctan2(sin(2*f*x + 2*e 
), cos(2*f*x + 2*e) + 1)), (cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2*co 
s(2*f*x + 2*e) + 1)^(1/4)*cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2* 
e) + 1)) + 1) - (a^2*c^2*cos(2*f*x + 2*e)^2 + a^2*c^2*sin(2*f*x + 2*e)^2 + 
 2*a^2*c^2*cos(2*f*x + 2*e) + a^2*c^2)*arctan2((cos(2*f*x + 2*e)^2 + sin(2 
*f*x + 2*e)^2 + 2*cos(2*f*x + 2*e) + 1)^(1/4)*sin(1/2*arctan2(sin(2*f*x + 
2*e), cos(2*f*x + 2*e) + 1)), (cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 + 2 
*cos(2*f*x + 2*e) + 1)^(1/4)*cos(1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 
 2*e) + 1)) - 1) - 2*(a^2*c^2*f*cos(2*f*x + 2*e)^2 + a^2*c^2*f*sin(2*f*x + 
 2*e)^2 + 2*a^2*c^2*f*cos(2*f*x + 2*e) + a^2*c^2*f)*integrate((((cos(6*f*x 
 + 6*e)*cos(2*f*x + 2*e) + 2*cos(4*f*x + 4*e)*cos(2*f*x + 2*e) + cos(2*f*x 
 + 2*e)^2 + sin(6*f*x + 6*e)*sin(2*f*x + 2*e) + 2*sin(4*f*x + 4*e)*sin(2*f 
*x + 2*e) + sin(2*f*x + 2*e)^2)*cos(9/2*arctan2(sin(2*f*x + 2*e), cos(2*f* 
x + 2*e))) + (cos(2*f*x + 2*e)*sin(6*f*x + 6*e) + 2*cos(2*f*x + 2*e)*sin(4 
*f*x + 4*e) - cos(6*f*x + 6*e)*sin(2*f*x + 2*e) - 2*cos(4*f*x + 4*e)*sin(2 
*f*x + 2*e))*sin(9/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))))*cos(5/2 
*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e) + 1)) - ((cos(2*f*x + 2*e)*sin 
(6*f*x + 6*e) + 2*cos(2*f*x + 2*e)*sin(4*f*x + 4*e) - cos(6*f*x + 6*e)*...
 
3.1.58.8 Giac [F]

\[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2 \, dx=\int { {\left (a \sec \left (f x + e\right ) + a\right )}^{\frac {5}{2}} {\left (c \sec \left (f x + e\right ) - c\right )}^{2} \,d x } \]

input
integrate((a+a*sec(f*x+e))^(5/2)*(c-c*sec(f*x+e))^2,x, algorithm="giac")
 
output
sage0*x
 
3.1.58.9 Mupad [F(-1)]

Timed out. \[ \int (a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^2 \, dx=\int {\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{5/2}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^2 \,d x \]

input
int((a + a/cos(e + f*x))^(5/2)*(c - c/cos(e + f*x))^2,x)
 
output
int((a + a/cos(e + f*x))^(5/2)*(c - c/cos(e + f*x))^2, x)